package com.qf.erpb.product.controller;

import com.qf.erpb.core.common.JsonResult;
import com.qf.erpb.core.vo.PageVO;
import com.qf.erpb.product.param.InventoryParam;
import com.qf.erpb.product.service.XgInventoryService;
import com.qf.erpb.product.vo.XgInventory;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inventory")
public class XgInventoryController {
    @Resource
    private XgInventoryService xgInventoryService;
    @ApiOperation("连表分页")
    @GetMapping("/page")
    public JsonResult pageInventory(InventoryParam param) {
//        param.setPageNum(1);
//        param.setPageSize(5);
        PageVO<XgInventory> appointmenttypePageVO = xgInventoryService.pageInventory(param);
        return JsonResult.ok(appointmenttypePageVO);
    }
}
